import { TOKEN_TIME,TOKEN_TIME_VALUE} from "./constant.js"
export const setTokenTime=()=>{
    localStorage.setItem(TOKEN_TIME,Date.now())
}
export const getTokenTime=()=>{
   return localStorage.getItem('tokenTime')
}
export const diffTokenTime=()=>{
   const currentTime=Date.now()
   const tokenTime=getTokenTime()
   console.log(currentTime,tokenTime,'tokenTime')
   return currentTime-tokenTime>TOKEN_TIME_VALUE
}